/*
 * @Author: 恒恒 1067531094@qq.com
 * @Date: 2022-10-12 17:02:28
 * @LastEditors: 恒恒 1067531094@qq.com
 * @LastEditTime: 2022-10-13 16:34:35
 * @FilePath: \作业\login.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const express = require('express')
const app = express()
const ejs = require('ejs')

//配置ejs模板引擎，后缀html
app.set('view engine', 'html')
app.set('views', __dirname + '/template')
app.engine('html', ejs.__express)

app.use(express.static(__dirname + '/static'))

app.use(express.urlencoded({ extended: false }))

const loginRouter = require('./router/loginRouter')

app.use(loginRouter)

app.listen(3000, () => {
    console.log('server bound')
})